package com.example.demo.dao;

import com.example.demo.model.Member;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @description: 会员DAO
 * @version: 1.0.0
 */
@Repository
public interface MemberRepository extends JpaRepository<Member, Long> {

    @Modifying
    @Query(value = "update Member set guideFlag = 1 where id =:id")
    void updateMemberGuide(@Param("id") Long id);
}
